package innerclasses;

/**
 * @author: liuchong
 * @create: 2023/3/28 10:28
 * @description:
 */
interface IChannel {
    void send(IMessage msg);
    interface IMessage {
        String getContent();
    }

}
class ChannelImpl implements IChannel {
    public void send(IMessage msg) {
        System.out.println(msg.getContent());
    }
    class MessageImpl implements IMessage {
        public String getContent() {
            return "hello";
        }
    }
}
public class InnerInterface {
    public static void main(String[] args) {
        IChannel channel = new ChannelImpl();
        channel.send(((ChannelImpl)channel).new MessageImpl());
    }
}
